package org.example.springmvc_demo6.service;


import org.example.springmvc_demo6.mapper.MessageInfoMapper;

import org.example.springmvc_demo6.model.MessageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageService {
    @Autowired
    private MessageInfoMapper messageInfoMapper;

    public Integer publicMessage(MessageInfo messageInfo){
        return messageInfoMapper.insertMessage(messageInfo);
    }

    public List<MessageInfo> getMessage(){
        return messageInfoMapper.selectMessageInfo();
    }


}
